using System;
using System.Collections.Generic;
using System.Text;
using ProjectBase.Data;
using Clanta.Core.DataInterfaces;
using Clanta.Core.Domain;
using NHibernate.Expression;

namespace Clanta.Data
{
    public class CustomerDao : AbstractNHibernateDao<Customer, long>, ICustomerDao
    {
        public CustomerDao(string sessionFactoryConfigPath)
            : base(sessionFactoryConfigPath)
        {
        }

        public List<Customer> GetCustomersSortedByName()
        {
            return CreateCreateria().AddOrder(Order.Asc("Name")).List<Customer>() as List<Customer>;
        }
    }
}
